import string

from modules.account_index_generator import AccountIndexGenerator
from modules.ads_config import AdsConfig
from modules.business_config import BusinessConfig
from utils.logger_utils import LoggerConfig

is_debug = True

# 全局日志对象
logger = LoggerConfig.get_logger()
# adspower的api地址
api_url = 'http://local.adspower.com:50325'
# 密码生成字符集
password_chars = string.ascii_letters + string.digits

# ads配置对象
ads_config = AdsConfig()
# 获取配置文件中的配置项
proxy_host = ads_config.get('ProxyConfig', 'proxy_host')
proxy_port = ads_config.get('ProxyConfig', 'proxy_port')
proxy_type = ads_config.get('ProxyConfig', 'proxy_type')
proxy_user_prefix = ads_config.get('ProxyConfig', 'proxy_user_prefix')
proxy_password = ads_config.get('ProxyConfig', 'proxy_password')


# 代理子账户编号生成器
account_index_generator = AccountIndexGenerator()

# 加载业务配置
business_configs = BusinessConfig()
android_versions = business_configs.data['android_versions']
chrome_versions = business_configs.data['chrome_versions']
devices = business_configs.data['devices']
hardware_configs = business_configs.data['hardware_configs']